﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Xml.Serialization;
using System.Collections;

namespace MVCTippSpielManagement.Management
{
	
	public class MyMenuItem 
	{

		public string _Text;
		public string _Name;
		public string _ShortCut;
		public bool _Enabled;

		[XmlElement("MyMenuItem")]
		//private ArrayList _MenuItems;
		public List<MyMenuItem> _MenuItems;

		[XmlElement("Groups")]
		private ArrayList _UserGroups;
		

		public MyMenuItem()
		{
			this._Text = "";
			this._Name = "";
			this._ShortCut = "";
			this._Enabled = false;

			//_MenuItems = new ArrayList();
			_MenuItems = new List<MyMenuItem>();
			_UserGroups = new ArrayList();

		}

		public void CallMethod(object sender, EventArgs e)
		{
			//Ruft Methode passend zu MenuItem auf
		}

		//Getter Setter

		public string Text
		{
			get { return _Text;}
			set
			{_Text = value;}
		}
		
		public string Name
		{
			get { return _Name; }
			set
			{ _Name = value; }
		}

		public string ShortCut
		{
			get { return _ShortCut; }
			set
			{ _ShortCut = value; }
		}

		public bool Enabled
		{
			get { return _Enabled; }
			set
			{ _Enabled = value; }
		}

		public List<MyMenuItem> MenuItems
		{
			get { return _MenuItems; }
			set
			{ _MenuItems = value; }
		}

		[XmlElement("Groups")]

		public ArrayList UserGroups
		{
			get { return _UserGroups; }
			set
			{ _UserGroups = value; }
		}
	}
}
